package com.gzh.teaching.model.vo;

import com.gzh.core.util.NumericHelper;
import com.gzh.teaching.service.dto.CourseUserIn;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * @Author guanzh
 * @Date 2022/1/28 10:06
 * @Description
 */
@Setter
@Getter
@ToString
public class CourseUserParam {

    private String courseId;

    private String userName;

    private String delUserId;

    public CourseUserIn paramToIn(Integer currentUserId) {
        CourseUserIn in = new CourseUserIn();
        in.setCourseId(NumericHelper.toInteger(this.courseId));
        in.setUserName(this.userName);
        in.setDelUserId(NumericHelper.toInteger(this.delUserId));
        in.setUserId(currentUserId);
        return in;
    }
}
